use std::{
    collections::HashMap,
    sync::{Arc, RwLock},
};

use r2d2_redis::{r2d2::Pool, RedisConnectionManager};
use sea_orm::DatabaseConnection;

use crate::system::init::{db_init, redis_init};

// lazy load
lazy_static::lazy_static! {
    pub static ref APOLLO_CONF:Arc<RwLock<HashMap<String,String>>>=Arc::new(RwLock::new(HashMap::new()));
    pub static ref REDIS_POOL_MAP :Arc<HashMap<String,Pool<RedisConnectionManager>>> = Arc::new(redis_init());
    pub static ref DB_POOL_MAP :Arc<HashMap<String,DatabaseConnection>> = Arc::new(db_init());
    pub static ref DEFAULT_PAGESIZE:u32 = 20;
    pub static ref MAX_PAGESIZE:u32 = 50;
}
